-
Notifications
You must be signed in to change notification settings - Fork 3
Syw UID2 6085 improve python dependency #66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Update pyproject.toml requires-python from >=3.6 to >=3.8 - Update setup.cfg classifiers to remove Python 3.6 and 3.7 support - Add support for Python 3.8, 3.9, 3.10, 3.11, and 3.12 - Update Dockerfile.dev to use Python 3.8 base image This change is necessary because the code uses importlib.metadata which was introduced in Python 3.8, making the previous >=3.6 requirement incorrect and causing import errors on older versions.
- Remove legacy setup.py and setup.cfg files - Update pyproject.toml to configure proper package discovery - Exclude node_modules, tests, examples, and venv from package discovery - Fix Docker build error caused by multiple top-level packages
- Add unit-tests job to build-and-test.yaml for Python 3.8 - Keep existing vulnerability-scan job using shared action - Add dev dependencies (pytest, pytest-cov, unittest-xml-reporting) to pyproject.toml - Remove setuptools from runtime dependencies (only needed for build) - Tested locally: 287 tests pass successfully
- Change from setuptools == 68.2.2 to setuptools < 81 - Allows more flexibility while maintaining compatibility - Keeps setuptools in build-system where it's needed for setuptools.build_meta
- Add unit-tests job that runs before build-and-publish - Tests run on Ubuntu with Python 3.8 (same as build-and-test.yaml) - Add needs: unit-tests dependency to ensure tests pass before publishing - Prevents publishing broken code to PyPi - Tested locally: 287 tests pass successfully
| unit-tests: | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we use matrix here 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so we could define a range of setups to run unit tests on, e.g. like below i extended to not just run unit tests on py 3.8 but 3.9/3.10/etc add test coverage, like this run:
https://github.com/IABTechLab/uid2-client-python/actions/runs/18513552871
- Test against Python 3.8, 3.9, 3.10, 3.11, 3.12, 3.13 - Ensures compatibility across supported Python versions - Improves test coverage and catches version-specific issues
…aml github action
1. Python Version & Dependency Updates
2. Modernizing Package Configuration
3. CI and Testing Enhancements